home *** CD-ROM | disk | FTP | other *** search
/ Scene Storm / Scene Storm - Volume 1.iso / coding / asm / games / scanconfig / getcpu_str.s < prev   
Text File  |  1980-01-03  |  866b  |  27 lines

  1.  
  2. *******************************************************************************
  3. * _LVOGetCPU
  4. * ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  5. * $Inputs:        None.
  6. * $Outputs:        a0.l = Ptr to CPU Type string
  7. *
  8. * $Requirements:    The Execbase *MUST* be intact for this code to work,
  9. *            in particular the cpu attention flags!
  10. ******************************************************************************
  11. AttnFlags    =    $128
  12.  
  13. _LVOGetCPU:    move.l    4.w,a6
  14.         move.b    AttnFlags+1(a6),d0    ;get CPU/MMU/CP Types from OS
  15.         andi.b    #%00001111,d0        ;we only want CPU types..
  16.         moveq    #"0",d1
  17. findcpu:    tst.b    d0            ;got cpu type yet?
  18.         beq.s    showcpu
  19.         lsr.b    #1,d0            ;check for next type...
  20.         addq.b    #1,d1            ;increase cpu type by 1
  21.         bra.s    findcpu
  22. showcpu:    lea    CPUType(pc),a0
  23.         move.b    d1,5(a0)
  24.         rts
  25. CPUType:    dc.b    'MC680x0',0        ;'x' inserted with 0,1,2,3 or 4
  26.         even
  27.